#ifndef __MYSQLCLIENT_HPP__
#define __MYSQLCLIENT_HPP__
#include <mysql/mysql.h>
#include <string>
#include <vector>


namespace wd
{
using std::string;
using std::vector;

class MySQLClient
{
public:
    MySQLClient(){}
    ~MySQLClient();

    void init();
    void connect(const string &,
                 const string &,
                 const string &,
                 const string &,
                 unsigned short port);

    bool writeOperattionQuery(const string &);
    vector<vector<string>> readOperationQuery(const string &);

private:
    MYSQL *_conn;
    MYSQL_RES *_res;
};

}//end of namespace

#endif // __MYSQLCLIENT_HPP__

